package com.rocpenghua.design.strategy;

/**
 * @author pengp
 * @date 2023年02月22日 15:57
 */
public class MainTest {
    public static void main(String[] args) {

        Environment environment=new Environment(new AddStrategy());
        int result=environment.calculate(20, 5);
        System.out.println(result);

        Environment environment1=new Environment(new SubtractionStrategy());
        int result1=environment1.calculate(20, 5);
        System.out.println(result1);
    }

}
